package com.wjh.kt_vod.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wjh.kt_vod.model.vod.CourseDescription;
import com.wjh.kt_vod.service.CourseDescriptionService;
import com.wjh.kt_vod.mapper.CourseDescriptionMapper;
import org.springframework.stereotype.Service;

/**
 *
 */
@Service
public class CourseDescriptionServiceImpl extends ServiceImpl<CourseDescriptionMapper, CourseDescription>
    implements CourseDescriptionService{

    /**
     * 根据课id删除课程描述
     * @param id
     */
    @Override
    public void removeDescriptionByCourseId(Long id) {
        LambdaQueryWrapper<CourseDescription> courseDescriptionLambdaQueryWrapper = new LambdaQueryWrapper<>();
        courseDescriptionLambdaQueryWrapper.eq(CourseDescription::getCourseId,id);
        baseMapper.delete(courseDescriptionLambdaQueryWrapper);
    }
}




